<?php
require_once "../lib/common.php";
require_once "../congfig/config.php";

$pid = $_POST['pid'];
$file= $_FILES['Enclosure'];
$sql = "UPDATE proinfor SET pRank ='6' ";
$query = $conn->query($sql);
$file = uploadfile($file, maxSize, filepath);
$sql = "select * form goodpro where pid = '$pid'";
$query = $conn->query($sql);
$num = $query->num_rows;
if($num>=1){
    alertMes("已经是优秀项目啦","project-list.php");
}
$sql = "insert into goodpro values 
(null,'$pid','$file' )";
$query = $conn->query($sql);
if($query){
    
    alertMes("添加成功","project-list.php");
}
alertMes("添加失败","addgooodpro.php");
